package cn.itcast.bos.utils;

import java.util.Collection;
import javax.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.client.WebClient;
import cn.itcast.crm.domain.Customer;


public class RS_Client {
	public static void main(String[] args) {
		// type 传参 --- @Consumes
		// accept 返回 ---- @Produces
		
		//未关联
//		Collection<? extends Customer> collection = WebClient
//				.create("http://localhost:9002/crm_management/services/customerService/noassociationcustomers")
//				.accept(MediaType.APPLICATION_JSON).getCollection(Customer.class);
//		System.out.println(collection);

		//已关联
//		Collection<? extends Customer> collection = WebClient
//		.create("http://localhost:9002/crm_management/services/customerService/associationfixedareacustomers/dq001")
//		.accept(MediaType.APPLICATION_JSON).getCollection(Customer.class);
//		System.out.println(collection);
		
//		update T_CUSTOMER set C_Fixed_AREA_ID=? where C_ID=?
		//关联定区id和客户id
//		WebClient.create("http://localhost:9002/crm_management/services/customerService/associationcustomerstofixedarea?customerIdStr=2,4&fixedAreaId=dq002")
//			.accept(MediaType.APPLICATION_JSON).put(null);
	
	}
}
